package com.xnx3.banmahuishou.core.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import com.xnx3.j2ee.entity.BaseEntity;

/**
 * 骑手信息表，相当于user表的延伸扩展
 * @author 王晓龙
 */
@Entity()
@Table(name = "laji_qishou")
public class Qishou extends BaseEntity implements java.io.Serializable {
	/**
	 * 工作状态 1正常
	 */
	public static final Short STATE_NORMAL = 1;
	/**
	 * 工作状态 0请假
	 */
	public static final Short STATE_LEAVE = 0;

	private Integer id;	//骑手的id，对应user.id
	private String name;	//骑手的名字，姓名
	private Integer allServiceNumb;	//总的服务次数，以收完给客户结算垃圾费用为完成一次服务
	private String serviceArea;	//服务范围，这是一组经纬度列表，格式如 [{123,234},{111,333}] 用这个在地图上圈起一片服务的区域来
	private Integer allWgight;	//总回收的重量，单位是g，注意这里是g不是kg，以取货完成给用户打款完毕为准
	private Integer allExpend;	//总花费，总支出，也就是总的支付给用户买垃圾的钱。单位是分
	private String alipayAccount;	//骑手的支付宝账号
	private String alipayName;	//骑手支付宝账号认证的姓名，结算的姓名
	private Short state;	//工作状态，1正常，0请假
	private String phone;	//骑手的联系电话。编辑这个电话时会将 qishou.phone 、 user.phone 这两个字段都要进行更新
	private String head;	//骑手头像，头像的绝对路径。如果更新头像
	private Integer addtime;	//骑手的注册时间，加入时间
	private Double longitude;	//经纬度
	private Double latitude;	//经纬度
	private Integer dailishangUserid;	//代理商用户id,关联user.id
	private String dailishangUsername;	//代理商名称,关联user.nickname
	private Integer wanggeUserid;	//网格用户id,关联user.id
	private String wanggeUsername;	//网格名称,关联user.nickname
	private Integer dayQuota;	//每天限额,网格给骑手限制的额度,每天支付的金额不能超过这个额度,单位分
	private Integer danQuota;	//每单限额,网格给骑手限制的额度,每单支付的金额不能超过这个额度,单位分
	
	@Id
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	@Column(name = "name", columnDefinition="char(20) COLLATE utf8mb4_general_ci COMMENT '骑手的名字，姓名' default ''")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Column(name = "all_service_number", columnDefinition="int(11) COMMENT '总的服务次数，以收完给客户结算垃圾费用为完成一次服务' default '0'")
	public Integer getAllServiceNumb() {
		return allServiceNumb;
	}
	public void setAllServiceNumb(Integer allServiceNumb) {
		this.allServiceNumb = allServiceNumb;
	}
	@Column(name = "service_area", columnDefinition="char(255) COLLATE utf8mb4_general_ci COMMENT '服务范围，这是一组经纬度列表，格式如 [{123,234},{111,333}] 用这个在地图上圈起一片服务的区域来' default ''")
	public String getServiceArea() {
		return serviceArea;
	}
	public void setServiceArea(String serviceArea) {
		this.serviceArea = serviceArea;
	}
	@Column(name = "all_wgight", columnDefinition="int(11) COMMENT '总回收的重量，单位是g，注意这里是g不是kg，以取货完成给用户打款完毕为准' default '0'")
	public Integer getAllWgight() {
		return allWgight;
	}
	public void setAllWgight(Integer allWgight) {
		this.allWgight = allWgight;
	}
	@Column(name = "all_expend", columnDefinition="int(11) COMMENT '总花费，总支出，也就是总的支付给用户买垃圾的钱。单位是分' default '0'")
	public Integer getAllExpend() {
		return allExpend;
	}
	public void setAllExpend(Integer allExpend) {
		this.allExpend = allExpend;
	}
	@Column(name = "alipay_account", columnDefinition="char(30) COLLATE utf8mb4_general_ci COMMENT '骑手的支付宝账号' default ''")
	public String getAlipayAccount() {
		return alipayAccount;
	}
	public void setAlipayAccount(String alipayAccount) {
		this.alipayAccount = alipayAccount;
	}
	@Column(name = "alipay_name", columnDefinition="char(20) COLLATE utf8mb4_general_ci COMMENT '骑手支付宝账号认证的姓名，结算的姓名' default ''")
	public String getAlipayName() {
		return alipayName;
	}
	public void setAlipayName(String alipayName) {
		this.alipayName = alipayName;
	}
	@Column(name = "state", columnDefinition="tinyint(2) COMMENT '工作状态，1正常，0请假' default '0'")
	public Short getState() {
		return state;
	}
	public void setState(Short state) {
		this.state = state;
	}
	@Column(name = "phone", columnDefinition="char(15) COLLATE utf8mb4_general_ci COMMENT '骑手的联系电话。编辑这个电话时会将 qishou.phone 、 user.phone 这两个字段都要进行更新' default ''")
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Column(name = "head", columnDefinition="char(150) COLLATE utf8mb4_general_ci COMMENT '骑手头像，头像的绝对路径。如果更新头像' default ''")
	public String getHead() {
		return head;
	}
	public void setHead(String head) {
		this.head = head;
	}
	@Column(name = "addtime", columnDefinition="int(11) COMMENT '骑手的注册时间，加入时间' default '0'")
	public Integer getAddtime() {
		return addtime;
	}
	public void setAddtime(Integer addtime) {
		this.addtime = addtime;
	}
	@Column(name = "longitude", columnDefinition="double(9,6) comment '经纬度'")
	public Double getLongitude() {
		return longitude;
	}

	public void setLongitude(Double longitude) {
		this.longitude = longitude;
	}
	
	@Column(name = "latitude", columnDefinition="double(9,6) comment '经纬度'")
	public Double getLatitude() {
		return latitude;
	}

	public void setLatitude(Double latitude) {
		this.latitude = latitude;
	}
	public static Short getStateNormal() {
		return STATE_NORMAL;
	}
	public static Short getStateLeave() {
		return STATE_LEAVE;
	}
	@Column(name = "dailishang_userid", columnDefinition="int(11) COMMENT '代理商用户id,关联user.id' default '0'")
	public Integer getDailishangUserid() {
		return dailishangUserid;
	}
	public void setDailishangUserid(Integer dailishangUserid) {
		this.dailishangUserid = dailishangUserid;
	}
	@Column(name = "dailishang_username", columnDefinition="char(100) COLLATE utf8mb4_general_ci COMMENT '代理商名称,关联user.nickname' default ''")
	public String getDailishangUsername() {
		return dailishangUsername;
	}
	public void setDailishangUsername(String dailishangUsername) {
		this.dailishangUsername = dailishangUsername;
	}
	@Column(name = "wangge_userid", columnDefinition="int(11) COMMENT '网格用户id,关联user.id' default '0'")
	public Integer getWanggeUserid() {
		return wanggeUserid;
	}
	public void setWanggeUserid(Integer wanggeUserid) {
		this.wanggeUserid = wanggeUserid;
	}
	@Column(name = "wangge_username", columnDefinition="char(100) COLLATE utf8mb4_general_ci COMMENT '网格名称,关联user.nickname' default ''")
	public String getWanggeUsername() {
		return wanggeUsername;
	}
	public void setWanggeUsername(String wanggeUsername) {
		this.wanggeUsername = wanggeUsername;
	}
	@Column(name = "day_quota", columnDefinition="int(11) COMMENT '每天限额,网格给骑手限制的额度,每天支付的金额不能超过这个额度,单位分' default '0'")
	public Integer getDayQuota() {
		return dayQuota;
	}
	public void setDayQuota(Integer dayQuota) {
		this.dayQuota = dayQuota;
	}
	@Column(name = "dan_quota", columnDefinition="int(11) COMMENT '每单限额,网格给骑手限制的额度,每单支付的金额不能超过这个额度,单位分' default '0'")
	public Integer getDanQuota() {
		return danQuota;
	}
	public void setDanQuota(Integer danQuota) {
		this.danQuota = danQuota;
	}
	
}
